home *** CD-ROM | disk | FTP | other *** search
- Path: sun001.spd.dsccc.com!jmccarty
- From: jmccarty@sun1307.spd.dsccc.com (Mike McCarty)
- Newsgroups: comp.lang.c
- Subject: Re: COLLEGE PROFESSORS! #2
- Date: 18 Apr 1996 20:36:59 GMT
- Organization: DSC Communications Corporation
- Message-ID: <4l695b$e87@sun001.spd.dsccc.com>
- References: <8BEC555.02C70031C5.uuout@sourcebbs.com>
- NNTP-Posting-Host: sun1307.spd.dsccc.com
-
- In article <8BEC555.02C70031C5.uuout@sourcebbs.com>,
- DAVID MOHORN <david.mohorn@sourcebbs.com> wrote:
- )For those who may have found my previous message entertaining to
- )read--and totally absurd--here another from last week.
- )
- )We have a program that reads a sequential file (50 items or so) and
- )placed these items in an array. Items can be added and deleted from the
- )array. There is only one catch, however. If you delete an item, it
- )really doesn't get deleted.
- )
- )This is the instructors way of deleting an item from an array:
- )
- )declare main_array variable for 50 elements
- )declare del_array variable for 50 elements
-
- An array is -not- a reasonable data structure to use when elements may
- need to be added/deleted. A linked list makes more sense. The rest of
- the article is, therefore, cut, since I think that -none- of the
- solutions using arrays makes any sense.
-
- Mike
-
- --
- ----
- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
-
- I don't speak for DSC. <- They make me say that.
-